Skip to content

Make rule-preprocessor process a single directory at a time - #372

Merged
nunoplopes merged 2 commits into
Cpp2Rust:masterfrom
joaotgouveia:single-dir-preprocessor
Sep 18, 2026
Merged

nunoplopes merged 2 commits into
Cpp2Rust:masterfrom
joaotgouveia:single-dir-preprocessor

Conversation

@joaotgouveia

Copy link
Copy Markdown
Contributor

Changes rule-preprocessor to process a single directory per invocation, making it possible to parallelize. This matches what is already the case for cpp-rule-preprocessor. Additionally, this drops modules.rs from source control.

@joaotgouveia
joaotgouveia force-pushed the single-dir-preprocessor branch from 26f238b to f94decf Compare September 16, 2026 02:29
Comment thread CMakeLists.txt
OUTPUT_STRIP_TRAILING_WHITESPACE
)

add_custom_command(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be split in two rules, each output its own binary. Then there's no need for this PREPROCESSOR_STAMP

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll split building the rules crate and the rule-preprocessor, keeping both commands together is not necessary since they are independent. However, preprocessing rust rules depends on both commands, one ensures the binary itself is build, and the other ensures that the rules crate dependencies are built.

Since preprocessing rust rules depends on the built dependencies, and not on the RUSTLS_HEADER the rules crate command outputs, won't it be clearer to keep the PREPROCESSOR_STAMP as an output of this command as well?

@nunoplopes
nunoplopes merged commit 4b39f92 into Cpp2Rust:master Sep 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants